package com.demospringboot.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@TableName("sys_user")
public class User implements Serializable {
    private static final long serialVersionUID = 1L;
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 用户名 (学号/教职工号/工号)
     */
    private String username;
    /**
     * 密码
     */
    private String password;
    /**
     * 姓名
     */
    private String name;
    /**
     * 角色
     */
    private Role role;
    /**
     * 宿舍号 (学生特有)
     */
    private String dormitoryNumber;
    /**
     * 工作岗位 (后勤人员特有)
     */
    private String position;
    
    private LocalDateTime createTime;

    private LocalDateTime updateTime;
    /**
     * 逻辑删除字段
     */
    @TableLogic
    private Integer deleted;
} 